#include <iostream>
#include <string>
using namespace std;

typedef unsigned long long ULL;

const int N = 100003;
const int P = 131;
//const ULL Q = 2e64;
int n, m, l1, r1, l2, r2;
string str;

class str_hash
{
private:
    ULL h[N]; //这个用来存储需要处理的字符串的哈希值，h[k]代表字符串前k个字符组成的字符串构成的哈希值
    ULL p[N]; //p[l]用来表示P^k，方便以后随取随用
public:
    str_hash(string str);
    ULL get(int l, int r);
};

str_hash::str_hash(string str)
{
    p[0] = 1;
    h[0] = 0; //因为一般不设置代表0的字符，以防止例如：A=0，AAA=0这样的情况出现造成冲突，所以这里定义，空字符为0，毕竟，不会有多个空字符
    for (int i = 0; str[i] != '\0'; ++i)
    {
        h[i + 1] = h[i] * P + str[i];
        p[i + 1] = p[i] * P;
    }
}

ULL str_hash::get(int l, int r)
{
    return h[r] - h[l - 1] * p[r - l + 1];
}

int main()
{
    cin >> n >> m;
    cin >> str;
    str_hash H(str);
    while (m--)
    {
        cin >> l1 >> r1 >> l2 >> r2;
        if (H.get(l1, r1) == H.get(l2, r2))
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    return 0;
}
